import request from '@/utils/request'

// 查询代理服务列表
export function listServer(query) {
  return request({
    url: '/system/aserver/list',
    method: 'get',
    params: query
  })
}

// 查询代理服务详细
export function getServer(id) {
  console.log(id)
  return request({
    url: '/system/aserver/get',
    method: 'get',
    params: { id }

  })
}

// 新增代理服务
export function addServer(data) {
  return request({
    url: '/system/aserver',
    method: 'post',
    data: data
  })
}

// 修改代理服务
export function updateServer(data) {
  return request({
    url: '/system/aserver/update',
    method: 'put',
    data: data
  })
}

// 删除代理服务
export function delServer(ID) {
  return request({
    url: '/system/aserver/' + ID,
    method: 'delete'
  })
}

export function changeHost(data) {
  return request({
    url: '/system/aserver/change',
    method: 'post',
    data: data
  })
}
